{extend name="public/base"/}
{block name="style"}

{/block}
{block name="body"}
<style>
    .menuBox li {
        float: left;
        width: 55px;
        height: 35px;
        line-height: 35px;
        text-align: center;
        font-size: 16px;
        -moz-border-radius: 8px;
        border-radius: 8px;
    }
</style>
{include file="public/header" /}
<div class="{$randomStr} pageBox {$randomStr} chaptersBox" >
    <h1 class="{$randomStr}"><a href="{:url('index/books/index',array("id"=>$id))}">{$title}</a></h1>
    <span>作者：{$author}</span>
    <ul class="{$randomStr} chaptersList {$randomStr} clearfix">
		{volist name="chapter" id="vo"}	
            <li {if $vo['isvip']==1}class="vip"{/if}><a href="javascript:void" onclick="goread{$randomStr}({if $vo.isvip==1}true{else}false{/if}, {$vo.saleprice}, '/chapter/read/{$vo.articleid}/{$vo.id}')">{$vo.chaptername}</a></li>
        {/volist}    
    </ul>
</div>

<script type="text/javascript">
    var egold = {$egold};
    function goread{$randomStr}(vip, saleprice, url){
        if(vip){
            {if $Think.session.user_auth.uid==null}
            $.loginBox(url);
            return;
            {/if}
        }
        window.location.href = url;
    }
</script>
{block name="include"}{include file="public:footer" /}{/block}

{/block}
{block name="script"}
{/block}